local hl_ex__kanpo = fk.CreateSkill{
  name = "hl_ex__kanpo",
}

Fk:loadTranslationTable {
  ["hl_ex__kanpo"] = "看破",
  [":hl_ex__kanpo"] = "你可以将一张黑色手牌当【无懈可击】使用。你使用的【无懈可击】不能被响应。",

  ["#hl_ex__kanpo"] = "看破：你可以将一张黑色手牌当不可响应的【无懈可击】使用",

  ["$hl_ex__kanpo1"] = "区区雕虫小技，微不足道矣。",
  ["$hl_ex__kanpo2"] = "识众寡之用者，胜之。",
}

hl_ex__kanpo:addEffect("viewas", {
  anim_type = "control",
  pattern = "nullification",
  prompt = "#hl_ex__kanpo",
  handly_pile = true,
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).color == Card.Black and table.contains(player:getHandlyIds(), to_select)
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local card = Fk:cloneCard("nullification")
    card.skillName = hl_ex__kanpo.name
    card:addSubcard(cards[1])
    return card
  end,
  enabled_at_response = function (self, player, response)
    return not response and #player:getHandlyIds() > 0
  end,
})

hl_ex__kanpo:addEffect(fk.PreCardUse, {
  can_refresh = function(self, event, target, player, data)
    return target == player and player:hasSkill(hl_ex__kanpo.name) and data.card.trueName == "nullification"
  end,
  on_refresh = function(self, event, target, player, data)
    data.disresponsiveList = table.simpleClone(player.room.players)
  end,
})

return hl_ex__kanpo